using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;using Maxleaf.EDI.Domain.K3;

namespace Maxleaf.EDI.DataAccess.K3
{
    public class t_JobTypeMap : EntityTypeConfiguration<t_JobType>
    {
        public t_JobTypeMap()
        {
            // Primary Key
            this.HasKey(t => t.FInterID);

            // Properties
            this.Property(t => t.FInterID)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.None);

            this.Property(t => t.FNumber)
                .IsRequired()
                .HasMaxLength(255);

            this.Property(t => t.FName)
                .IsRequired()
                .HasMaxLength(255);

            this.Property(t => t.FNote)
                .IsRequired()
                .HasMaxLength(1000);

            // Table & Column Mappings
            this.ToTable("t_JobType");
            this.Property(t => t.FInterID).HasColumnName("FInterID");
            this.Property(t => t.FNumber).HasColumnName("FNumber");
            this.Property(t => t.FName).HasColumnName("FName");
            this.Property(t => t.FSalary).HasColumnName("FSalary");
            this.Property(t => t.FNote).HasColumnName("FNote");
            this.Property(t => t.FDeleted).HasColumnName("FDeleted");
            this.Property(t => t.FParentID).HasColumnName("FParentID");
        }
    }
}
